// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.parser.*;

// import java.util.HashMap;
// import java.util.std::map;

// import static com.alibaba.druid.sql.parser.CharTypes.isFirstIdentifierChar;
// import static com.alibaba.druid.sql.parser.LayoutCharacters.EOI;
// import static com.alibaba.druid.sql.parser.Token.LITERAL_CHARS;
#pragma once
#include <string>
#include <list>
#include <unordered_map>
#include "../../../parser/Lexer.h"
// #include "unicode/ustring.h"

class SymbolTable;
class Keywords;
class SQLParserFeature;
class Token;

class MySqlLexer : public Lexer
{
public:
  static SymbolTable_ptr quoteTable;
  static std::shared_ptr<std::unordered_map<std::string, Token_ptr>> map_;
  static Keywords_ptr DEFAULT_MYSQL_KEYWORDS;
  static std::shared_ptr<std::unordered_map<wchar_t, bool>> identifierFlags;

  static bool __init;
  static bool init();

  MySqlLexer(char *input, int inputLength, BOOL_ptr skipComment);

  MySqlLexer(string_ptr input);

  MySqlLexer(string_ptr input, SQLParserFeature_list_ptr features);

  MySqlLexer(string_ptr input, BOOL_ptr skipComment, BOOL_ptr keepComments);

  // override
  virtual void scanSharp() override;
  // override
  virtual void scanVariable() override;
  // override
  virtual void scanVariable_at() override;
  // override
  virtual void scanIdentifier() override;
  // override
  virtual void scanString() override;

  void skipFirstHintsOrMultiCommentAndNextToken();
  // override
  virtual void scanComment() override;

  static bool isIdentifierChar(wchar_t c);
};
